#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n = 0;
	int fb = 0;
	int a = 1;
	int b = 1;
	scanf("%d", &n);
	if (n > 0 && n <= 2)
		printf("1");
	else if (n > 2)
	{
		while (n > 2)
		{
			n--;
			fb = a + b;
			a = b;
			b = fb;
		}
	}
	printf("%d", fb);
	return 0;
}